<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/layui/layui.js"></script>
<link type="text/css" href="js/layui/css/layui.css" rel="stylesheet" />
<script>
layui.use('table', function(){
  var table = layui.table;
  
  //第一个实例
  table.render({
    elem: '#demo'
   
    ,url: 'stu/findAll.do' //数据接口
    ,page: true //开启分页
     
    ,cols: [[ //表头
      {field: 'stu_id', title: 'ID', width:80, sort: true, fixed: 'left'}
      ,{field: 'stu_name', title: '用户名', width:80}
      ,{field: 'sex', title: '性别', width:80, sort: true}
      ,{field: 'mtel', title: '城市', width:80} 
      ,{field: 'qq', title: '签名', width: 177}
      ,{field: 'address', title: '积分', width: 80, sort: true}
      ,{field: 'birthday', title: '评分', width: 80, sort: true}
      ,{field: 'stu_status', title: '职业', width: 80}
      ,{field: '', title: '财富', width: 135,templet:function(d){return d.clazz.classname}}
    ]]
    
  });
  
});
</script>
<body>
	<table id="demo" lay-filter="test"></table>
</body>
</html>